FROM openjdk:11
# FROM adoptopenjdk/openjdk11:jdk-11.0.17_8-alpine
ENV TZ=Asia/Shanghai
# add default ENV
ENV ppostgresql=postgresql
ENV ppostgresport=5432
ENV pgusername=postgres
ENV pgpassword=password
ENV predis=redis
ENV predispassword=
ENV predisport=6379
ENV logginglevel=warn
ENV shiro=true
ENV scpthread=5
ENV ocpthread=5
ENV reportthread=5
ENV schema=public
ENV dbname=openatc
ENV jwtToken=kedacom
# todo: duplicate with ENV TZ
ENV pgtimezone=Asia/Shanghai

RUN ln -sf /usr/share/zoneinfo/{TZ} /etc/localtime && echo "{TZ}" > /etc/timezone

ADD ./target/openatc-admin.jar /app.jar
ENTRYPOINT ["java","-jar","./app.jar","--spring.profiles.active=docker"]

# ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005","-jar","./app.jar","--spring.profiles.active=docker"]



